package com.zzuli.fitness.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zzuli.fitness.entity.Course;
import com.zzuli.fitness.mapper.CourseDao;
import com.zzuli.fitness.service.CourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("courseService")
public class CourseServiceImpl extends ServiceImpl<CourseDao, Course> implements CourseService {

    @Autowired
    private CourseDao courseDao;

    @Override
    public List<Course> findCourseOneDay(String day) {
        return courseDao.selectByDay(day);
    }

    @Override
    public List<Course> selectSpecialCourse() {
        return courseDao.selectSpecial();
    }

    @Override
    public Course selectPrivateCourse(Integer id) {
        return courseDao.selectPrivate(id);
    }

    @Override
    public Course selectCourseById(Integer programId) {
        return courseDao.selectByPrimaryKey(programId);
    }
}
